1. Field of the Invention
The present invention relates generally to an improved data processing system, and in particular, to a computer implemented method for operating data storage devices. Still more particularly, the present invention relates to a computer implemented method, system, and computer usable program code for an improved data storage device driver.
2. Description of the Related Art
Data storage devices are devices used for storing data in a data processing system. Some examples of data storage devices are magnetic hard disks, flash memory devices, optical drives, solid state mass storage devices that may substitute magnetic hard disks, and tape drives.
An application executing on a data processing system may send data input/output (I/O) request to a data storage device. The application, generally through an operating system, utilizes a device driver associated with the data storage device for sending the I/O requests, and receiving any corresponding responses. A device driver is a software or firmware that contains the information necessary for communicating with a specific hardware device. Generally, a device driver is specific to a particular operating system. In commonly used data processing systems, the application sends a request to the operating system, the operating system sends a corresponding request to the device driver, and the device driver sends a corresponding request to the device. Any response from the device to the application may traverse the same path in reverse order.
Device drivers for data storage devices employ certain techniques for obtaining efficiency in processing the I/O requests. For example, a data storage device driver may use a queue data structure to sequence the I/O requests received from various applications. Such a queue is known as an elevator queue, and an algorithm for populating the elevator queue is called an elevator algorithm.
An elevator algorithm sorts the I/O requests by block addresses on the data storage device, such as from the lowest address requested to the highest address requested. The elevator algorithm sorts the I/O requests in block address order so that the consequent I/O requests issued to the data storage device request data from adjacent or nearby blocks.
A block address is an address in a data structure implemented on the data storage device. The block address corresponds to a location in the data storage device where a block of data may be read or written. A block of data is predefined size of data in number of bits or bytes. For example, a block of data may be 512 bytes of data that begins at the specified block address.
The elevator queue in a data storage device driver is of a size proportional to an I/O queue size associated with the data storage device. An I/O queue is a queue associated with a data storage device where the data storage device receives I/O requests. For example, if the I/O queue associated with a particular data storage device is capable of storing ten I/O requests, a data storage device driver might implement an elevator queue to sort and store fifty I/O requests.